/*
 * Copyright (c) liuw <liuw.name@gmail.com> 
 * All rights reserved.
 *
 * This file is part of the RabbitOS.  The RabbitOS is free software, also known
 * as "open source;" you can redistribute it and/or modify it under the terms
 * of the GNU General Public License (GPL), version 2, as published by the Free
 * Software Foundation (FSF).  To explore alternate licensing terms, contact
 * the Rabbit OS team.
 * 
 * The RabbitOS is distributed in the hope that it will be useful, but WITHOUT 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GPL for more details.  You should have
 * received a copy of the GPL along with the RabbitOS; see the file COPYING. If
 * not, write to the FSF, 59 Temple Place #330, Boston, MA 02111-1307, USA.
 *
 */
/*
 * printk.c
 * 10-Jun-08
 */

#include <stdarg.h>

extern int vsprintf(char *, const char *, va_list);
extern void console_puts(const char *c);

int printk(const char *fmt, ...)
{
	int i;
	char buf[256];

	va_list arg = (va_list) ((char *) (&fmt) + 4);
	i = vsprintf(buf, fmt, arg);

	console_puts(buf);

	return i;
}
